﻿// -----------------------------------------------------------------------
// <copyright file="MainMenu.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Ex04.Menus.Delegates
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// This class represents the main menu typed menue items. just like the sub menu it contains a title and other menu item types (action/sub menu)
    /// the main difference between them is the "SetExitOption" method which allows the user to exit the program.
    /// </summary>
    public class MainMenu : Menu
    {
        public MainMenu(string i_Title)
            : base(i_Title)
        {
            this.SetExitOption();
        }

        private void SetExitOption()
        {
            this.AddMenuItem(new ActionMenu("Exit"));
        }
    }
}
